package com.example.logistics.repository;

import com.example.logistics.entity.CustomerOrder;
import com.example.logistics.entity.Shipment;
import com.example.logistics.entity.ShipmentStatus;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

public interface ShipmentRepository extends JpaRepository<Shipment, Long> {
    Optional<Shipment> findByTrackingNumber(String trackingNumber);
    List<Shipment> findByStatus(ShipmentStatus status);
    List<Shipment> findByOrder(CustomerOrder order);
}


